import request from '@/utils/request'

// 查询核酸信息列表
export function listPtesting(query) {
  return request({
    url: '/system/ptesting/list',
    method: 'get',
    params: query
  })
}

// 查询核酸信息详细
export function getPtesting(id) {
  return request({
    url: '/system/ptesting/' + id,
    method: 'get'
  })
}

// 新增核酸信息
export function addPtesting(data) {
  return request({
    url: '/system/ptesting/add',
    method: 'post',
    data: data
  })
}

// 修改核酸信息
export function updatePtesting(data) {
  return request({
    url: '/system/ptesting',
    method: 'put',
    data: data
  })
}

// 删除核酸信息
export function delPtesting(id) {
  return request({
    url: '/system/ptesting/' + id,
    method: 'delete'
  })
}

// 导出核酸信息
export function exportPtesting(query) {
  return request({
    url: '/system/ptesting/export',
    method: 'get',
    params: query
  })
}

// 姓名下拉框
export function nameselect(query) {
  return request({
    url: '/system/ptesting/selectPersonXl',
    method: 'get',
    params: query
  })
}

// 机构下拉框
export function mechanism(query) {
  return request({
    url: '/system/ptesting/selectOrganizationXl',
    method: 'get',
    params: query
  })
}

// 机构下拉框
export function importTemplate(query) {
  return request({
    url: '/system/ptesting/importTemplate',
    method: 'get',
    params: query
  })
}